import multiprocessing


def down_load(queue):
    list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
    for i in list:
        queue.put(i)
    print("数据增加完毕")


def parse_data(queue):
    list_data = []
    while True:
        data = queue.get()
        list_data.append(data)

        if queue.empty():
            break
    print(list_data)


def main():
    queue = multiprocessing.Queue()

    t1 = multiprocessing.Process(target=down_load, args=(queue,))
    t2 = multiprocessing.Process(target=parse_data, args=(queue,))
    t1.start()
    t2.start()


if __name__ == '__main__':
    main()
